import { postRequest } from '@/utils/api'

const $storagePvcApi = {

  // 获取所有PVC信息
  listAllPvc: () => {
    return postRequest('/gv-kube/storage/pvc/list', null)
  },
  // 分页获取所有PVC信息
  listAllPvcByPage: param => {
    return postRequest('/gv-kube/storage/pvc/page', param)
  },
  // 删除pvc
  deletePvc: param => {
    return postRequest(`/gv-kube/storage/pvc/delete`, param)
  },
  // 创建pvc
  createPvc: param => {
    return postRequest(`/gv-kube/storage/pvc/create`, param)
  },
  // 根据pvcId获取pv信息
  getPvInfoByPvcId: param => {
    return postRequest(`/gv-kube/storage/pv/get/${param}`, null)
  },
  // 获取所有存储类信息
  getAllStorageClass: () => {
    return postRequest('/gv-kube/storage/sc/list', null)
  },
  // 根获取应用商店后端在服务器上的共享路径
  getAppStorePvPath: () => {
    return postRequest('/gv-kube/storage/sharepath/get', null)
  },
}

export default $storagePvcApi
